//
//  BIDTypesManager.h
//  随手记01
//
//  Created by zd2011 on 13-5-23.
//  Copyright (c) 2013年 邵瑞. All rights reserved.
//
//11111111111111111
#import <Foundation/Foundation.h>
@class BIDATypes;
@interface BIDTypesManager : NSObject
+(BIDTypesManager*)shareTypesManager;
-(BOOL)insertATypeOrASubType:(NSString*)type orSubtype:(NSString *)subType;
-(BOOL)readPlistInfoToDatabase;
-(NSMutableArray *)DatabaseHadTypes;
-(NSInteger)numberOfSubTypeInType:(NSInteger)type_id;
-(NSMutableArray *)listOfSubTypeInMainType:(NSInteger)mainType_id;

-(NSMutableDictionary*)readDatabasePutIntoDict;
-(BOOL) updataTheTypeOrSubType:(BIDATypes*)nowType andBeforeType:(BIDATypes*)oldType;
//////////////////
-(BOOL)addTypeOSubType:(BIDATypes *)subtypeOrType addAtypeOrSubType:(NSString *)type OrSubType:(NSString *)subType;
//////////////////

-(BOOL)addAtypeOrSubType:(NSString *)type OrSubType:(NSString *)subType;
-(NSString*)selectTypeName:(NSInteger)type_id;
-(NSString *)selectSubTypeName:(NSInteger)subType_id;
-(NSInteger) selectTypeid:(NSString * )typeName;
-(NSInteger)selectSubTypeid:(NSString *) subTypeName;
////////////
-(NSMutableArray *)totalYearBills;

//删除某一年的账单
-(BOOL) deleteAYearBill:(NSInteger)aYear;
//查某一月的账单
-(NSInteger) selectAMonthBills:(NSInteger)aYear;
-(NSMutableArray *) aYearOfMonthTotalBills:(NSInteger)aYear;
//删除某一个月的账单
-(BOOL) deleteAMonthBill:(NSInteger) aMonth inYear:(NSInteger )year;
@end
